1. Field of the Invention
The present invention relates to a data storage device for handling data in sector units and a write processing method for the data storage device, and more particularly to a data storage device for preventing not writing of everything which is generated by an unexpected power supply failure, and write processing method for the data storage device.
2. Description of the Related Art
Because of recent demands for the computerized processing of data, larger capacities are demanded for medium storage devices for storing data, such as magnetic disk devices and optical disk devices. Therefore the track density and the recording density of a disk medium are increasing more and more. In such a data storage device, data is recorded in sector units.
The data storage device for recording data in sector units operates by an external power supply, so if an unexpected power supply disconnection occurs during the recording of data, the write operation stops.
FIG. 7 is a diagram depicting a prior art. In the disk storage device, the write gate WG turns ON by the servo gate signal SG, and data is recorded in the interval between the servo gate signal. In this example, three sectors of data are recorded in the interval of the servo gate. If an unexpected power supply disconnection occurs at this time, voltage fluctuation starts, and when the voltage drops to a level where operation cannot be guaranteed, a reset is generated to stop the operation.
In this case, if a reset is generated in the middle of writing a sector in recording in sector units, the data is written in a part (shaded portion) of the sector, and operation stops, so an incomplete writing of the sector occurs, and a read error occurs when the power is recovered. In other words, the control circuit recognizes that the data was written in the sector by sending the data to the head in sector units, therefore the control unit cannot recognize the incomplete writing of the sector caused by the power supply disconnection.
FIG. 8 is a diagram depicting a conventional sector guarantee function. In the case of FIG. 7, for example, voltage fluctuation starts by an unexpected power supply disconnection, and when the voltage drops to a level where operation cannot be guaranteed, a reset is generated and the stop of operation is instructed. At this time, according to the first conventional sector guarantee method, the voltage holding circuit is installed so that if in the middle of writing to a sector, the entire sector is written and then operation stops by the voltage holding circuit (e.g. Japanese Patent Application Laid-Open No. H02-154359 (FIG. 1, FIG. 2)).
In the case of the proposal of the second sector guarantee method, a threshold voltage (e.g. 4.8V), which is higher than the reset voltage (e.g. 4.2V), is set with respect to the power supply voltage (e.g. 5V), and if the voltage becomes this threshold voltage or less, it is judged that a voltage drop occurred, and the operation stops when the writing to the sector completes (e.g. Japanese Patent Application Laid-Open No. 2000-122813 (FIG. 2)).
Because of recent demands for downsizing devices, such a disk storage device is also installed in compact servers and mobile equipment (e.g. notebook type personal computers and portable AV (Audio/Visual) equipment)). In such a device, in many cases the stability of the power supply is low. For example, in the case of a notebook type personal computer, a large capacity power supply may not be installed to downsize and decrease price. Also a notebook type personal computer may be driven by a small capacity battery.
Therefore with the first conventional sector guarantee method, where the data is guaranteed by hardware (voltage holding circuit), the prices of the data storage device and the device to which this data storage device is installed increase, and downsizing is also difficult.
In the case of the second conventional sector guarantee method, the setting of the threshold voltage of the external power supply is difficult if the power supply fluctuation is high, that is fluctuation is relatively high at low voltage, as described above. In particular if an absolute value is set, as described above, an adjustment is required for each device to be installed. This adjustment operation requires enormous labor for the millions of disk device which are manufactured, and induces a rise in device cost. If the threshold value is set as a predetermined value, on the other hand, an abnormality may be detected depending on the device to be installed, and the reliability of the device drops.